cmake_minimum_required(VERSION 3.0.2)
project(thermal_cam)

## Compile as C++11, supported in ROS Kinetic and newer
#add_compile_options(-std=c++11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -std=c++11")
set(CMAKE_BUILD_TYPE Release)

set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib/thermal)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)

set(libPath ${CMAKE_SOURCE_DIR})
message(libPath:  ${libPath})

include_directories(
  include
  ${libPath}/lib/clientToService/include

)
find_library(CLIENTTOSERVICE NAMES libclientToService.so PATHS ${libPath}/lib/clientToService/lib)
message(${CLIENTTOSERVICE})

link_directories(
    lib
    lib/HCNetSDKCom
)

add_executable(${PROJECT_NAME}   
  src/main/thermalMain.cpp
  
  src/thermalcam.cpp
  src/capPicture.cpp 

  src/computeTime.cpp

  )
target_link_libraries(${PROJECT_NAME} 
 -lpthread -lm
 ${CLIENTTOSERVICE}

 ${libPath}/lib/libAudioRender.so
 ${libPath}/lib/libcrypto.so
 ${libPath}/lib/libcrypto.so.1.0.0
 ${libPath}/lib/libHCCore.so
 ${libPath}/lib/libhcnetsdk.so
 ${libPath}/lib/libhpr.so
 ${libPath}/lib/libNPQos.so
 ${libPath}/lib/libopenal.so.1
 ${libPath}/lib/libPlayCtrl.so
 ${libPath}/lib/libssl.so
 ${libPath}/lib/libSuperRender.so
 ${libPath}/lib/libz.so

 #HCNetSDKCom file dir
 ${libPath}/lib/HCNetSDKCom/libanalyzedata.so
 ${libPath}/lib/HCNetSDKCom/libAudioIntercom.so
 ${libPath}/lib/HCNetSDKCom/libHCAlarm.so
 ${libPath}/lib/HCNetSDKCom/libHCCoreDevCfg.so
 ${libPath}/lib/HCNetSDKCom/libHCDisplay.so
 ${libPath}/lib/HCNetSDKCom/libHCGeneralCfgMgr.so
 ${libPath}/lib/HCNetSDKCom/libHCIndustry.so
 ${libPath}/lib/HCNetSDKCom/libHCPlayBack.so
 ${libPath}/lib/HCNetSDKCom/libHCPreview.so
 ${libPath}/lib/HCNetSDKCom/libHCVoiceTalk.so
 ${libPath}/lib/HCNetSDKCom/libiconv2.so
 ${libPath}/lib/HCNetSDKCom/libStreamTransClient.so
 ${libPath}/lib/HCNetSDKCom/libSystemTransform.so
)
